function validInfo(){
	client_name = document.frmClientInfo.client_name.value;
	client_type = document.frmClientInfo.client_type.value;
	country_region = document.frmClientInfo.country_region.value;
	client_email = document.frmClientInfo.client_email.value;
	email = document.frmClientInfo.email.value;
	
	if (client_name == ""){
		alert("Information does not complete.\n\nNote: please enter all mandatory field (*).");
		document.frmClientInfo.client_name.focus();
	}
	else if (client_type == ""){
		alert("Information does not complete.\n\nNote: please enter all mandatory field (*).");
		document.frmClientInfo.client_type.focus();			
	}
	else if (country_region == ""){
		alert("Information does not complete.\n\nNote: please enter all mandatory field (*).");
		document.frmClientInfo.country_region.focus();		
	}
	else if (validMail(document.frmClientInfo.client_email.value)==false){
		document.frmClientInfo.client_email.focus();
	}
	else if (validMail(document.frmClientInfo.email.value)==false){
		document.frmClientInfo.email.focus();
	}
	else{
		document.frmClientInfo.submit();
	}
}

function str(keyCode){
	if ((keyCode >= 33 && keyCode <= 45)
		|| (keyCode == 47)
		|| (keyCode >= 58 && keyCode <= 63)
		|| (keyCode >= 91 && keyCode <= 94)
		|| (keyCode == 96)
		|| (keyCode >= 123 && keyCode <= 126))
	 {
		event.returnValue = false; 
		alert("Invalid format!\n\nEmail doesn't allow special charactor!!!");
	}
}

function validMail(email){
	if (email!=""){
	   var address=email;
	   var longueur=0;
	   var ad=0;
	   var i=0;
	
	   while(longueur<address.length)
		{
		 if (address.charAt(longueur)=='@')
		  {
			ad++;
			i=longueur;
		  }
		 longueur++;
		}
		  if (((ad!=1)||(i<1))||((address.length-5)<=i))
				  {
			  alert("Invalid e-mail format! \n\n"
				+"Please enter your e-mail address correctly.");
				return false;
		   }
		  else
			return true;
	}
	else{
		return true;
	}
}
